package com.qf.controller;

import com.qf.pojo.resp.BaseResp;
import com.qf.service.XcCityAreaService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * 查询地区
 * @author WYD
 * @date 2021/10/25  21:24
 */
@Api(value = "根据城市查询地区",tags = "根据城市查询地区")
@RequestMapping("/area")
@RestController
public class XcCityAreaController {

    @Autowired
    XcCityAreaService xcCityAreaService;

    /**
     * 根据城市查询地区
     * @return
     */

    @ApiOperation("根据城市查询地区")
    @RequestMapping(value = "/findAll",method = RequestMethod.GET)
    public BaseResp findAll(@ApiParam(name = "cityId", value = "城市cityId", required = true)
                                @RequestParam("cityId") Integer cityId) {
        return xcCityAreaService.findAll(cityId);
    }

}
